package com.softwarerusher.model;

/**
 * TRentdetailId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TRentdetailId implements java.io.Serializable {

	// Fields

	private TBook TBook;
	private Integer rentNum;
	private Double rentPrice;
	private TRent TRent;

	// Constructors

	/** default constructor */
	public TRentdetailId() {
	}

	/** full constructor */
	public TRentdetailId(TBook TBook, Integer rentNum, Double rentPrice,
			TRent TRent) {
		this.TBook = TBook;
		this.rentNum = rentNum;
		this.rentPrice = rentPrice;
		this.TRent = TRent;
	}

	// Property accessors

	public TBook getTBook() {
		return this.TBook;
	}

	public void setTBook(TBook TBook) {
		this.TBook = TBook;
	}

	public Integer getRentNum() {
		return this.rentNum;
	}

	public void setRentNum(Integer rentNum) {
		this.rentNum = rentNum;
	}

	public Double getRentPrice() {
		return this.rentPrice;
	}

	public void setRentPrice(Double rentPrice) {
		this.rentPrice = rentPrice;
	}

	public TRent getTRent() {
		return this.TRent;
	}

	public void setTRent(TRent TRent) {
		this.TRent = TRent;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TRentdetailId))
			return false;
		TRentdetailId castOther = (TRentdetailId) other;

		return ((this.getTBook() == castOther.getTBook()) || (this.getTBook() != null
				&& castOther.getTBook() != null && this.getTBook().equals(
				castOther.getTBook())))
				&& ((this.getRentNum() == castOther.getRentNum()) || (this
						.getRentNum() != null
						&& castOther.getRentNum() != null && this.getRentNum()
						.equals(castOther.getRentNum())))
				&& ((this.getRentPrice() == castOther.getRentPrice()) || (this
						.getRentPrice() != null
						&& castOther.getRentPrice() != null && this
						.getRentPrice().equals(castOther.getRentPrice())))
				&& ((this.getTRent() == castOther.getTRent()) || (this
						.getTRent() != null
						&& castOther.getTRent() != null && this.getTRent()
						.equals(castOther.getTRent())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTBook() == null ? 0 : this.getTBook().hashCode());
		result = 37 * result
				+ (getRentNum() == null ? 0 : this.getRentNum().hashCode());
		result = 37 * result
				+ (getRentPrice() == null ? 0 : this.getRentPrice().hashCode());
		result = 37 * result
				+ (getTRent() == null ? 0 : this.getTRent().hashCode());
		return result;
	}

}